﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zocono.WCS.Domain.EntityInfo;
using Zocono.WCS.Infrastructure.ApllicationDto.DtoUser;
using Zocono.WCS.Infrastructure.ApllicationDto.DtoWcsManage;
using Zocono.WCS.Infrastructure.ApllicationDto.WCSTaskDto;

namespace Zocono.WCS.Domain
{
    public class AutoMapperConfigProfile : Profile
    {
        public AutoMapperConfigProfile()
        {
            //用户
            #region 管理用户相关
            // winform 后台使用
            CreateMap<UserInfo, UserInfoApiDto>();
            CreateMap<UserInfoApiDto, UserInfo>();
            CreateMap<UserMangerDto, UserInfoApiDto>();
            CreateMap<UserInfo, UserInfoDto>();
            CreateMap<UserInfoDto, UserInfo>();

            // web后台使用
            CreateMap<UserRoleInfo, UserRoleInfoDto>();
            CreateMap<UserMangerDto, UserRoleInfoDto>();
            CreateMap<UserRoleInfoDto, UserRoleInfo>();

            CreateMap<RoleFunctionInfo, RoleFunctionInfoDto>();
            CreateMap<RoleFunctionInfoDto, RoleFunctionInfo>();
            CreateMap<FunctionInfo, FunctionInfoDto>();
            CreateMap<FunctionInfoDto, FunctionInfo>();

            CreateMap<MenuInfo, MenuInfoDto>();
            CreateMap<UserMangerDto, MenuInfoDto>();
            CreateMap<MenuInfoDto, MenuInfo>();

            CreateMap<RoleInfo, RoleInfoApiDto>();
            CreateMap<UserMangerDto, RoleInfoApiDto>();
            CreateMap<RoleInfoApiDto, RoleInfo>();

            CreateMap<RoleInfo, RoleInfoDto>();
            CreateMap<RoleInfoDto, RoleInfo>();

            CreateMap<RoleRightInfo, RoleRightInfoDto>();
            CreateMap<UserMangerDto, RoleRightInfoDto>();
            CreateMap<RoleRightInfoDto, RoleRightInfo>();

            #endregion


            #region Socket 相关
            CreateMap<SocketClientInfo, SocketClientInfoDto>();
            CreateMap<SocketClientInfoDto, SocketClientInfo>();
            CreateMap<List<SocketClientInfo>, List<SocketClientInfoDto>>();
            CreateMap<List<SocketClientInfoDto>, List<SocketClientInfo>>();
            #endregion


            #region 设备管理
            CreateMap<EquipmentTypeInfo, EquipmentTypeInfoDto>();
            CreateMap<EquipmentTypeInfoDto, EquipmentTypeInfo>();

            CreateMap<DispatchEquipmentInfo, DispatchEquipmentInfoDto>();
            CreateMap<DispatchEquipmentInfoDto, DispatchEquipmentInfo>();

            CreateMap<EquipmentTypeInfo, EquipmentTypeInfoDto>();
            CreateMap<EquipmentTypeInfoDto, EquipmentTypeInfo>();

            CreateMap<EquipmentLayoutTypeInfo, EquipmentLayoutTypeInfoDto>();
            CreateMap<EquipmentLayoutTypeInfoDto, EquipmentLayoutTypeInfo>();

            CreateMap<EquipmentLayoutInfo, EquipmentLayoutInfoDto>();
            CreateMap<EquipmentLayoutInfoDto, EquipmentLayoutInfo>();
            #endregion

            #region 配置管理
            CreateMap<PlanarProcessServiceMapInfo, PlanarProcessServiceMapInfoDto>();
            CreateMap<PlanarProcessServiceMapInfoDto, PlanarProcessServiceMapInfo>();

            CreateMap<PlcReadDbInfo, PlcReadDbInfoDto>();
            CreateMap<PlcReadDbInfoDto, PlcReadDbInfo>();

            CreateMap<ProgrameInfo, ProgrameInfoDto>();
            CreateMap<ProgrameInfoDto, ProgrameInfo>();

            CreateMap<JobInfo, JobInfoDto>();
            CreateMap<JobInfoDto, JobInfo>();

            CreateMap<BytesMapObjectInfo, BytesMapObjectInfoDto>();
            CreateMap<BytesMapObjectInfoDto, BytesMapObjectInfo>();

            CreateMap<RouteDetailInfo, RouteDetailInfoDto>();
            CreateMap<RouteDetailInfoDto, RouteDetailInfo>();

            CreateMap<PlcWriteDbInfo, PlcWriteDbInfoDto>();
            CreateMap<PlcWriteDbInfoDto, PlcWriteDbInfo>();

            CreateMap<ScWorkModelInfo, ScWorkModelInfoDto>();
            CreateMap<ScWorkModelInfoDto,ScWorkModelInfo>();


            CreateMap<ElevatorInfo, ElevatorInfoDto>();
            CreateMap<ElevatorInfoDto, ElevatorInfo>();
            
            CreateMap<ElevatorJudgeInfo, ElevatorJudgeInfoDto>();
            CreateMap<ElevatorJudgeInfoDto, ElevatorJudgeInfo>();

            CreateMap<ElevatorMasterInfo, ElevatorMasterInfoDto>();
            CreateMap<ElevatorMasterInfoDto, ElevatorMasterInfo>();

            CreateMap<PlcPointInfo, PlcPointInfoDto>();
            CreateMap<PlcPointInfoDto, PlcPointInfo>();

            CreateMap<List<PlcPointInfoDto>, List<PlcPointInfo>>();
            CreateMap<List<PlcPointInfo>, List<PlcPointInfoDto>>();

            #endregion


            #region Log
            CreateMap<OperateLogInfo, OperateLogInfoDto>();
            CreateMap<OperateLogInfoDto,OperateLogInfo>();

            #endregion


            #region 任务
            CreateMap<WorkTaskInfo, WCSWorkTaskInfoDto>();
            CreateMap<WCSWorkTaskInfoDto, WorkTaskInfo>();
            CreateMap<WorkTaskInfo, HistoryWorkTaskInfoDto>();
            CreateMap<WorkTaskInfo, HistoryWorkTaskInfo>();
            CreateMap<HistoryWorkTaskInfoDto, WorkTaskInfo>();
            CreateMap<HistoryWorkTaskInfo, WorkTaskInfo>();
            CreateMap<HistoryWorkTaskInfo, HistoryWorkTaskInfoDto>();
            CreateMap<HistoryWorkTaskInfoDto, HistoryWorkTaskInfo>();
            #endregion

        }
    }
}
